<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4" data-th-fragment="header">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- CSRF -->
    <meta name="_csrf" th:content="${_csrf.token}"/>
    <!-- default header name is X-CSRF-TOKEN -->
    <meta name="_csrf_header" th:content="${_csrf.headerName}"/>

    <!-- Tether core CSS -->

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="../../css/bootstrap.css" th:href="@{https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css}">
    <!-- Font-Awesome CSS -->

    <!-- NProgress CSS -->

    <!-- thinker-md CSS -->

    <!-- bootstrap tags CSS -->

    <!-- bootstrap chosen CSS -->

    <!-- toastr CSS -->

    <!-- jQuery image cropping plugin CSS -->

    <!-- Custom styles -->
    <link rel="stylesheet" href="../../css/blog.css" th:href="@{/css/blog.css}">
    <title>Title</title>
</head>
<body>
    <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
        <a class="navbar-brand" href="#">AqieHome</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="true" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="navbar-collapse collapse " id="navbarCollapse" style="">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
                </li>
                <!--<li class="nav-item">
                    <a class="nav-link" href="#">Link</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link disabled" href="#">Disabled</a>
                </li>-->
                <!--<li class="nav-item dropdown show">
                    <a class="nav-link dropdown-toggle" href="http://example.com" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">Settings</a>
                    <div class="dropdown-menu " aria-labelledby="dropdown01">
                        <a class="dropdown-item" href="#">Action</a>
                        <a class="dropdown-item" href="#">Another action</a>
                        <a class="dropdown-item" href="#">Something else here</a>
                    </div>
                </li>-->
            </ul>
            <form class="form-inline mt-2 mt-md-0 col align-self-center">
                <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
                <a href="/search">
                    <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
                </a>
            </form>
        </div>

        <div class="form-inline  align-self-right" sec:authorize="isAuthenticated()" >
            <div class="dropdown">
                <a class="btn btn-secondary dropdown-toggle" href="#" role="button"
                   id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    <span sec:authentication="name"></span>
                </a>

                <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
                    <a class="dropdown-item" href="#">个人中心</a>
                    <form action="/logout" th:action="@{/logout}" method="post">
                        <input class="btn btn-outline-success " type="submit" value="退出">
                    </form>
                </div>
            </div>
        </div>
        <div sec:authorize="isAnonymous()">
            <a href="/login" class="btn btn-outline-success my-2 my-sm-0" type="submit">登录</a>
            <a href="/register" class="btn btn-outline-success my-2 my-sm-0" type="submit">注册</a>
        </div>
    </nav>
    <!--<img src="../../img/avatar2.jpg" alt="" width="100px" height="100px" th:src="@{/img/avatar.jpg}">-->
</body>
    <!--<script src="../../js/text.js"></script>-->
</html>